package com._system.instructions;

import java.io.Writer;
import java.util.HashMap;

import com.jfinal.template.Directive;
import com.jfinal.template.Engine;
import com.jfinal.template.Env;
import com.jfinal.template.stat.Scope;

public class Eval  extends Directive {

	@Override
	public void exec(Env env, Scope scope, Writer writer) {
		String content = (String) exprList.eval(scope);
		System.out.println(content);
		String result = Engine.use().getTemplateByString(content).renderToString(new HashMap());
		write(writer, result);
	}

}
